import request from './request/index.js'

const apiBizWebVidAptPg = (d) => request({ method: 'post', url: '/business/web/index/appointVideo', data: d }) // 首页指定视频查询
const apiBizWebVidMorPg = (d) => request({ method: 'post', url: '/business/web/index/moreVideo', data: d }) // 首页更多视频查询
const apiBizWebVidRecPg = (d) => request({ method: 'post', url: '/business/web/index/recommendationVideo', data: d }) // 首页推荐视频
const apiBizWebVidD = (d, v) => request({ method: 'delete', url: '/business/web/video/delete', data: d }, v) // 删 - 视频
const apiBizWebVidPg = (d) => request({ method: 'post', url: '/business/web/video/getList', data: d }) // 列表 - 视频
const apiBizWebVidChkMd5 = (d) => request({ method: 'get', url: '/business/web/video/digest-exists', data: d }) // 视频 - 检查 MD5 是否存在
const apiBizWebMscR = (s) => request({ method: 'post', url: '/business/web/music/info/' + s, data: {} }) // 读 - 音乐
const apiBizWebMscD = (d, v) => request({ method: 'delete', url: '/business/web/music/delete', data: d }, v) // 删 - 音乐
const apiBizWebMscPg = (d) => request({ method: 'post', url: '/business/web/music/getList', data: d }) // 列表 - 音乐
const apiBizWebMscChkMd5 = (d) => request({ method: 'get', url: '/business/web/music/digest-exists', data: d }) // 音乐 - 检查 MD5 是否存在
const apiBizWebMscLab = (d) => request({ method: 'get', url: '/business/web/label', data: d }) // 音乐 - 获取标签分类
// 灵感
const apiBizWebInspCU = (d) => request({ method: 'post', url: '/business/web/product-inspiration/create', data: { ...d, contented: 0 } }) // 增、改 - 灵感
const apiBizWebInspR = (d) => request({ method: 'get', url: '/business/web/product-inspiration/get', data: d }) // 查 - 灵感
const apiBizWebInspD = (d, v) => request({ method: 'delete', url: '/business/web/product-inspiration/delete', data: d }, v) // 删 - 灵感
const apiBizWebInspPg = (d) => request({ method: 'get', url: '/business/web/product-inspiration/page', data: d }) // 列表 - 灵感
const apiBizWebInspUsrPg = (d) => request({ method: 'get', url: '/business/web/product-inspiration/userPage', data: { ...d, contented: 0 } }) // 用户列表 - 灵感
const apiBizWebInspPcnt = (d) => request({ method: 'get', url: '/business/web/product-inspiration/play', data: d }) // 播放量 - 灵感
const apiBizWebInspShr = (d) => request({ method: 'get', url: '/business/web/product-inspiration/shareInspiration', data: d }) // 分享 - 灵感
const apiBizWebInspLk = (d) => request({ method: 'get', url: '/business/web/product-inspiration/praised', data: d }) // 赞-踩-取消 - 灵感
const apiBizWebInspCollCU = (d) => request({ method: 'post', url: '/business/web/product-inspiration/create', data: { ...d, contented: 1 } }) // 增、改 - 灵感合集
const apiBizWebInspCollR = (d) => request({ method: 'get', url: '/business/web/product-inspiration/get', data: d }) // 查 - 灵感合集
const apiBizWebInspCollD = (d, v) => request({ method: 'delete', url: '/business/web/product-inspiration/delete', data: d }, v) // 删 - 灵感合集
const apiBizWebInspCollUsrPg = (d) => request({ method: 'get', url: '/business/web/product-inspiration/userPage', data: { ...d, contented: 1 } }) // 用户列表 - 灵感合集
const apiBizWebInspEpC = (d) => request({ method: 'post', url: '/business/web/product-inspiration/selectSave', data: d }) // 增 - 灵感单集（加入合集）
const apiBizWebInspEpD = (d, v) => request({ method: 'delete', url: '/business/web/product-inspiration/remove', data: d }, v) // 删 - 灵感单集（移除合集）
const apiBizWebInspEpSrt = (d) => request({ method: 'get', url: '/business/web/product-inspiration/dragSort', data: d }) // 排序 - 灵感单集
// 产品指数
const apiBizWebProdIdxPg = (d) => request({ method: 'get', url: '/business/web/product-indices/page', data: d}) // 列表 - 产品指数
export const ApiBizWeb = {
  VidAptPg: apiBizWebVidAptPg,
  VidMorPg: apiBizWebVidMorPg,
  VidRecPg: apiBizWebVidRecPg,
  VidD: apiBizWebVidD,
  VidPg: apiBizWebVidPg,
  VidChkMd5: apiBizWebVidChkMd5,
  MscR: apiBizWebMscR,
  MscD: apiBizWebMscD,
  MscPg: apiBizWebMscPg,
  MscChkMd5: apiBizWebMscChkMd5,
  MscLab: apiBizWebMscLab,
  InspCU: apiBizWebInspCU,
  InspR: apiBizWebInspR,
  InspD: apiBizWebInspD,
  InspPg: apiBizWebInspPg,
  InspUsrPg: apiBizWebInspUsrPg,
  InspPcnt: apiBizWebInspPcnt,
  InspShr: apiBizWebInspShr,
  InspLk: apiBizWebInspLk,
  InspCollCU: apiBizWebInspCollCU,
  InspCollR: apiBizWebInspCollR,
  InspCollD: apiBizWebInspCollD,
  InspCollUsrPg: apiBizWebInspCollUsrPg,
  InspEpC: apiBizWebInspEpC,
  InspEpD: apiBizWebInspEpD,
  InspEpSrt: apiBizWebInspEpSrt,
  ProdIdxPg: apiBizWebProdIdxPg,
}

const apiBizUserVidDtlPg = (d) => request({ method: 'post', url: '/business/user/video/detailList', data: d }) // 列表 - 视频详情
const apiBizUserMscDtlPg = (d) => request({ method: 'post', url: '/business/user/music/detailList', data: d }) // 列表 - 音乐详情
const apiBizUserVidPg = (d) => request({ method: 'post', url: '/business/user/video/getVideoList', data: d }) // 列表 - 可申请版权视频
const apiBizUserMscPg = (d) => request({ method: 'post', url: '/business/user/music/getMusicList', data: d }) // 列表 - 可申请版权视频
const apiBizUserFlMscU = (d) => request({ method: 'post', url: '/business/user/file/music', data: d }) // 修改 - 音乐
const apiBizUserFlVidU = (d) => request({ method: 'post', url: '/business/user/file/video', data: d }) // 修改 - 视频
export const ApiBizUser = {
  VidDtlPg: apiBizUserVidDtlPg,
  MscDtlPg: apiBizUserMscDtlPg,
  VidPg: apiBizUserVidPg,
  MscPg: apiBizUserMscPg,
  FlMscU: apiBizUserFlMscU,
  FlVidU: apiBizUserFlVidU,
}

const apiBizImgCU = (d) => request({ method: 'post', url: '/business/image/create', data: d }) // 增,改 - 图片
const apiBizImgR = (d) => request({ method: 'get', url: '/business/image/get', data: d }) // 查 -
const apiBizImgD = (d, v) => request({ method: 'delete', url: '/business/image/delete', data: d }, v) // 删 -
const apiBizImgPg = (d) => request({ method: 'get', url: '/business/image/page', data: d }) // 列表 -
const apiBizImgUsrPg = (d) => request({ method: 'get', url: '/business/image/userPage', data: d }) // 列表 -
const apiBizImgChkMd5 = (d) => request({ method: 'get', url: '/business/image/digest-exists', data: d }) // 检查 MD5 是否存在
export const ApiBizImg = {
  CU: apiBizImgCU,
  R: apiBizImgR,
  D: apiBizImgD,
  Pg: apiBizImgPg,
  UsrPg: apiBizImgUsrPg,
  ChkMd5: apiBizImgChkMd5,
}

const apiBizPwrCrt = (d) => request({ method: 'post', url: '/business/power/create', data: d })  // 创建授权书
const apiBizPwrGet = (d) => request({ method: 'get', url: '/business/power/query', data: d }) // 查看授权书
const apiBizPwrCrtWk = (d) => request({ method: 'post', url: '/business/power/createWork', data: d })  // 获取作品证书
export const ApiBizPwr = {
  PwrC: apiBizPwrCrt,
  PwrG: apiBizPwrGet,
  PwrCWk: apiBizPwrCrtWk,
}

const apiBizArtR = (d) => request({ method: 'get', url: '/business/article/get', data: d }) // 查 - 文章
const apiBizArtPg = (d) => request({ method: 'get', url: '/business/article/list', data: d }) // 列表 - 文章
export const ApiBizArt = {
  R: apiBizArtR,
  Pg: apiBizArtPg,
}

const apiBizFlDloadUrl = (d) => request({ method: 'get', url: '/business/file/download/getUrl', data: d }) // 下载 - 文件
const apiBizFlDloadMscSmp = (d) => request({ method: 'get', url: '/business/file/download/getMusicSample', data: d }) // 下载 - 音乐小样
const apiBizFlDloadVidSmp = (d) => request({ method: 'get', url: '/business/file/download/getSample', data: d }) // 下载 - 视频小样
const apiBizFlDloadImgSmp = (d) => request({ method: 'get', url: '/business/file/download/getImageSample', data: d }) // 下载 - 图片小样
export const ApiBizFlDload = {
  Url: apiBizFlDloadUrl,
  MscSmp: apiBizFlDloadMscSmp,
  VidSmp: apiBizFlDloadVidSmp,
  ImgSmp: apiBizFlDloadImgSmp,
}

const apiBizPrdFavC = (d) => request({ method: 'post', url: '/business/product/favorite/create', data: d }) // 收藏
const apiBizPrdFavD = (d) => request({ method: 'post', url: '/business/product/favorite/delete', data: d }) // 取消收藏
const apiBizPrdFavChk = (d) => request({ method: 'get', url: '/business/product/favorite/exits', data: d }) // 检查是否收藏
const apiBizPrdFavCnt = (d) => request({ method: 'get', url: '/business/product/favorite/get-count', data: d }) // 获取收藏数量
const apiBizPrdFavVidPg = (d) => request({ method: 'get', url: '/business/product/favorite/video/page', data: d }) // 列表 - 视频商品收藏
const apiBizPrdFavMscPg = (d) => request({ method: 'get', url: '/business/product/favorite/music/page', data: d }) // 列表 - 音乐商品收藏
const apiBizPrdFavImgPg = (d) => request({ method: 'get', url: '/business/product/favorite/image/page', data: d }) // 列表 - 图片商品收藏
const apiBizPrdHistPg = (d) => request({ method: 'post', url: '/business/product/browse-history/page', data: d }) // 列表 - 浏览记录
export const ApiBizPrd = {
  FavC: apiBizPrdFavC,
  FavD: apiBizPrdFavD,
  FavChk: apiBizPrdFavChk,
  FavCnt: apiBizPrdFavCnt,
  FavVidPg: apiBizPrdFavVidPg,
  FavMscPg: apiBizPrdFavMscPg,
  FavImgPg: apiBizPrdFavImgPg,
  HistPg: apiBizPrdHistPg,
}

const apiBizSensChk = (d) => request({ method: 'post', url: '/business/sensitive/create', data: d }) // 是否包含违禁词
export const ApiBizSens = {
  Chk: apiBizSensChk,
}